import { generateDetailPanelHtml } from './detailPanelTemplate'
import { DetailPanelConfig } from './types'
import { RecordData } from '../../types'

export class DetailPanelRenderer {
  generateHtml(record: RecordData): string {
    const config: DetailPanelConfig = {
      record,
      recordId: record.id
    }

    return generateDetailPanelHtml(config)
  }

  // 可以扩展更多渲染相关的方法
  generatePreviewHtml(record: RecordData): string {
    // 生成预览版本的HTML，比如用于快速查看
    return this.generateHtml(record)
  }
}
